-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Induce data availability into contract #41
base: master
Are you sure you want to change the base?
Conversation
Almost done for contract with data availability and handling L1 op (current only depositing and registering),
|
For encoding the priority op of registry user, the gas usage increase to ~330k in registryUser method (before it cost ~90k) |
} | ||
} | ||
|
||
function shiftAndReverseBits16(uint16 val, uint8 offset) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we combine shiftAndReverseBits16
, shiftAndReverseBits32
, shiftAndReverseBits64
, shiftAndReverseBits128
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried but failed. If we defined both foo(uint16) and foo(uint32), the calling of foo seems to be considered as ambiguous even you have specified the type of argument explicitly.
Finally all issues have been fixed and contracts now complete work with priority L1 ops. A script for depositing on L1 has also be induced |
This PR make new contract work with data availability. The encoded tx data would be an argument when submitting block and being verified in the contract. As the result, the signature of submitBlock method has been revised.
For the new implement of submitBlock, some view function is added to facilitate debugging and checking everything is ready without wasting of gas fee.
Note current the original submitBlock method is still being kept in the contract under the name
submitBlockLegacy
in case we still need it for some legacy task or compare the gas usage. This need to be removed before the contract is officially released.